<?php

namespace common\models\ding;

use common\models\base\BaseModel;
use Yii;

/**
 * This is the model class for table "{{%fy_banner}}".
 *
 * @property int $id 主键
 * @property string $banner 图片
 * @property int $status 状态[-1:删除;0:禁用;1启用]
 * @property string $created_at 创建时间
 * @property string $updated_at 修改时间
 */
class Check extends BaseModel
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%check}}';
    }
    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'timeresult' => '考勤结果',
            'checktype' => '考勤类型',
            'locationresult' => '位置结果',
            'sourcetype' => '数据来源',
            'userId' => '姓名',
            'userCheckTime'=>'打卡时间'
        ];
    }
    public function getName()
    {
        return $this->hasOne(Name::class, ['name_id' => 'userId']);
    }
    public function rules()
    {
        return [
            [['timeresult','locationresult','sourcetype','userId','userCheckTime'], 'safe'],
        ];
    }
}
